﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DataContextLayer;

namespace BlueHarvestSnippetGenerator
{
	
    public partial class ComponentBar : UserControl
    {

        public NavigationService Nav { get { return NavigationService.GetNavigationService(this); } }

	    public List<string> UserData;

	    public int UserId
	    {
	        get { return (int)Application.Current.Properties["userId"]; }
	    }
         

	   

        public ComponentBar()
        {
            InitializeComponent();

            CbLoaded();

        }

	   

	    //Loading events for the component bar
        private void CbLoaded()
        {
            

        }

        private void GetUsername()
        {

            //userName.Text = UserId.ToString();

            

            achievement.Text = UserProfile.UserAchievementPoints.ToString(CultureInfo.InvariantCulture);

        }

	    private void BtnLogOut(object sender, RoutedEventArgs e)
        {
            
            Nav.PageNav(PageName.Welcome);

        }

        private void BtnAchievement(object sender, RoutedEventArgs e)
        {

            Nav.PageNav(PageName.Achievement);

        }
    }
}